package com.cz.nongyetongv5.bean;

import java.io.Serializable;

/**
 * 检查结果
 */
public class JianChaJieGuo implements Serializable {

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	private Integer id = null;

	private String name;

	private String problem;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getProblem() {
		return problem;
	}

	public void setProblem(String problem) {
		this.problem = problem;
	}

	public JianChaJieGuo(Integer id, String name) {
		this.id = id;
		this.name = name;
	}

	public JianChaJieGuo(Integer id, String name, String problem) {
		this.id = id;
		this.name = name;
		this.problem = problem;
	}

	public JianChaJieGuo() {
	}

	@Override
	public boolean equals(Object o) {

		if (o != null) {

			if (o instanceof JianChaJieGuo) {

				JianChaJieGuo jianChaJieGuo = (JianChaJieGuo) o;

				if (this.id < 1) {

					return this.id == jianChaJieGuo.getId()
							&& this.problem.equals(jianChaJieGuo.getProblem());

				} else {

					return this.id == jianChaJieGuo.getId();
				}

			} else {
				return false;
			}

		} else {
			return false;
		}
	}
}
